function ajax(url,step) {
    
    fetch(url).then( res => {
        return res.json();
    });
    step.next();
}

function* step() {

    let _that = this;
    console.log('fetching beers');
    const beers = yield ajax('http://api.react.beer/v2/search?q=hops&type=beer',);
    console.log(beers);

    console.log('fetching wes');
    const wes = yield ajax('http://api.github.con/users/hotpotliuyu',);
    console.log(wes);

    console.log('fetching fat job');
    const fatJob = ajax('http://api.discogs.com/artists/51980');
    console.log(fatJob);
}



const stepGan = step();
